<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>attribute的用法</title>
</head>
<body>
<div m="马尔代夫" l="蜜月" id="one">啦啦啦啦啦</div>
<a id="test" jj="on your mind"></a>
<div align="center">流弊</div>
<script>
//    attribute：获取标签的属性值，比如class，id等
    console.log(document.getElementById("one").getAttribute("m"));
    console.log(document.getElementById("one").attributes[0]);
</script>
</body>
</html>